package linc.spring.demo.service.impl;

import linc.spring.demo.service.RoleService;
import linc.spring.demo.service.UserService;
import linc.spring.framework.annotation.Autowired;
import linc.spring.framework.annotation.Component;
import linc.spring.framework.annotation.PostConstruct;
import linc.spring.framework.annotation.Value;

/**
 * @author yqlin
 * @date 2021/9/3 23:16
 * @description
 */
@Component(name = "userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private RoleService roleService;

    @Value("测试@Value成功")
    private String test;

    @Override
    public void test() {
        System.out.println("得到test赋值: " + test);
        System.out.println("执行userService.test()");
    }

    @PostConstruct
    void testPostConstruct() {
        System.out.println("执行testPostConstruct");
    }

}
